home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / nivb / sap.frm < prev    next >
Text File  |  1995-05-07  |  10KB  |  313 lines

  1. VERSION 2.00
  2. Begin Form SAPForm 
  3.    Caption         =   "Service Advertising Protocol Services Test"
  4.    ClientHeight    =   3600
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   7125
  8.    Height          =   4005
  9.    Left            =   1035
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   3600
  12.    ScaleWidth      =   7125
  13.    Top             =   1140
  14.    Width           =   7245
  15.    Begin Frame Frame1 
  16.       Caption         =   "Nearest Services"
  17.       Height          =   2895
  18.       Left            =   120
  19.       TabIndex        =   1
  20.       Top             =   120
  21.       Width           =   6855
  22.       Begin Label NACSHCLabel 
  23.          Height          =   255
  24.          Left            =   5640
  25.          TabIndex        =   28
  26.          Top             =   2520
  27.          Width           =   495
  28.       End
  29.       Begin Label NACSLabel 
  30.          Height          =   255
  31.          Left            =   2280
  32.          TabIndex        =   27
  33.          Top             =   2520
  34.          Width           =   2775
  35.       End
  36.       Begin Label Label11 
  37.          Alignment       =   1  'Right Justify
  38.          Caption         =   "NACS:"
  39.          Height          =   255
  40.          Left            =   1560
  41.          TabIndex        =   26
  42.          Top             =   2520
  43.          Width           =   615
  44.       End
  45.       Begin Label AdverPrintServerHCLabel 
  46.          Height          =   255
  47.          Left            =   5640
  48.          TabIndex        =   25
  49.          Top             =   2280
  50.          Width           =   495
  51.       End
  52.       Begin Label RemoteBridgeHCLabel 
  53.          Height          =   255
  54.          Left            =   5640
  55.          TabIndex        =   24
  56.          Top             =   2040
  57.          Width           =   495
  58.       End
  59.       Begin Label ArchiveServerHCLabel 
  60.          Height          =   255
  61.          Left            =   5640
  62.          TabIndex        =   23
  63.          Top             =   1800
  64.          Width           =   495
  65.       End
  66.       Begin Label PrintServerHCLabel 
  67.          Height          =   255
  68.          Left            =   5640
  69.          TabIndex        =   22
  70.          Top             =   1560
  71.          Width           =   495
  72.       End
  73.       Begin Label JobServerHCLabel 
  74.          Height          =   255
  75.          Left            =   5640
  76.          TabIndex        =   21
  77.          Top             =   1320
  78.          Width           =   495
  79.       End
  80.       Begin Label FileServerHCLabel 
  81.          Height          =   255
  82.          Left            =   5640
  83.          TabIndex        =   20
  84.          Top             =   1080
  85.          Width           =   495
  86.       End
  87.       Begin Label PrintQueueHCLabel 
  88.          Height          =   255
  89.          Left            =   5640
  90.          TabIndex        =   19
  91.          Top             =   840
  92.          Width           =   495
  93.       End
  94.       Begin Label AdverPrintServerLabel 
  95.          Height          =   255
  96.          Left            =   2280
  97.          TabIndex        =   18
  98.          Top             =   2280
  99.          Width           =   2775
  100.       End
  101.       Begin Label RemoteBridgeLabel 
  102.          Height          =   255
  103.          Left            =   2280
  104.          TabIndex        =   17
  105.          Top             =   2040
  106.          Width           =   2775
  107.       End
  108.       Begin Label ArchiveServerLabel 
  109.          Height          =   255
  110.          Left            =   2280
  111.          TabIndex        =   16
  112.          Top             =   1800
  113.          Width           =   2775
  114.       End
  115.       Begin Label PrintServerLabel 
  116.          Height          =   255
  117.          Left            =   2280
  118.          TabIndex        =   15
  119.          Top             =   1560
  120.          Width           =   2775
  121.       End
  122.       Begin Label JobServerLabel 
  123.          Height          =   255
  124.          Left            =   2280
  125.          TabIndex        =   14
  126.          Top             =   1320
  127.          Width           =   2775
  128.       End
  129.       Begin Label FileServerLabel 
  130.          Height          =   255
  131.          Left            =   2280
  132.          TabIndex        =   13
  133.          Top             =   1080
  134.          Width           =   2775
  135.       End
  136.       Begin Label Label10 
  137.          Caption         =   "Hop Count"
  138.          Height          =   255
  139.          Left            =   5400
  140.          TabIndex        =   12
  141.          Top             =   360
  142.          Width           =   1095
  143.       End
  144.       Begin Label Label9 
  145.          Caption         =   "Service Name"
  146.          Height          =   255
  147.          Left            =   2760
  148.          TabIndex        =   11
  149.          Top             =   360
  150.          Width           =   1335
  151.       End
  152.       Begin Label Label1 
  153.          Caption         =   "Service Type"
  154.          Height          =   255
  155.          Left            =   1080
  156.          TabIndex        =   10
  157.          Top             =   360
  158.          Width           =   1215
  159.       End
  160.       Begin Label Label2 
  161.          Alignment       =   1  'Right Justify
  162.          Caption         =   "Print queue:"
  163.          Height          =   255
  164.          Left            =   960
  165.          TabIndex        =   9
  166.          Top             =   840
  167.          Width           =   1215
  168.       End
  169.       Begin Label Label3 
  170.          Alignment       =   1  'Right Justify
  171.          Caption         =   "File server:"
  172.          Height          =   255
  173.          Left            =   1080
  174.          TabIndex        =   8
  175.          Top             =   1080
  176.          Width           =   1095
  177.       End
  178.       Begin Label Label4 
  179.          Alignment       =   1  'Right Justify
  180.          Caption         =   "Job server:"
  181.          Height          =   255
  182.          Left            =   1200
  183.          TabIndex        =   7
  184.          Top             =   1320
  185.          Width           =   975
  186.       End
  187.       Begin Label Label5 
  188.          Alignment       =   1  'Right Justify
  189.          Caption         =   "Print server:"
  190.          Height          =   255
  191.          Left            =   1080
  192.          TabIndex        =   6
  193.          Top             =   1560
  194.          Width           =   1095
  195.       End
  196.       Begin Label Label6 
  197.          Alignment       =   1  'Right Justify
  198.          Caption         =   "Archive server:"
  199.          Height          =   255
  200.          Left            =   360
  201.          TabIndex        =   5
  202.          Top             =   1800
  203.          Width           =   1815
  204.       End
  205.       Begin Label Label7 
  206.          Alignment       =   1  'Right Justify
  207.          Caption         =   "Remote bridge server:"
  208.          Height          =   255
  209.          Left            =   240
  210.          TabIndex        =   4
  211.          Top             =   2040
  212.          Width           =   1935
  213.       End
  214.       Begin Label Label8 
  215.          Alignment       =   1  'Right Justify
  216.          Caption         =   "Advertising print server:"
  217.          Height          =   255
  218.          Left            =   120
  219.          TabIndex        =   3
  220.          Top             =   2280
  221.          Width           =   2055
  222.       End
  223.       Begin Label PrintQueueLabel 
  224.          Height          =   255
  225.          Left            =   2280
  226.          TabIndex        =   2
  227.          Top             =   840
  228.          Width           =   2775
  229.       End
  230.    End
  231.    Begin CommandButton OKButton 
  232.       Caption         =   "&OK"
  233.       Height          =   375
  234.       Left            =   3000
  235.       TabIndex        =   0
  236.       Top             =   3120
  237.       Width           =   855
  238.    End
  239. End
  240.  
  241. Sub Form_Load ()
  242.     Dim nearestService As SAP
  243.  
  244.     ccode% = QueryServices(3, OT_PRINT_QUEUE, Len(nearestService), nearestService)
  245.     If (ccode% <> SUCCESSFUL) Then
  246.         PrintQueueLabel.Caption = "No response"
  247.     Else
  248.         PrintQueueLabel.Caption = nearestService.serverName
  249.         PrintQueueHCLabel.Caption = nearestService.interveningNetworks
  250.     End If
  251.     
  252.     ccode% = QueryServices(3, OT_FILE_SERVER, Len(nearestService), nearestService)
  253.     If (ccode% <> SUCCESSFUL) Then
  254.         FileServerLabel.Caption = "No response"
  255.     Else
  256.         FileServerLabel.Capt